package edu.zut.hb.software.base.utils;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class GetSession {

    public static SessionFactory factory;
    static {
        Configuration cg=new Configuration().configure();
        factory = cg.configure().buildSessionFactory();
    }

    public static Session getFactory(){
        return factory.openSession();
    }
}
